// 数据模型定义
const exhibitionData = {
    // 顶部
    top1_1: [
        { title: "永恒瞬间：咱们的抗战", link: "https://jinghecx.com/mobile/?s=clcn&b=17613885006718806", url: "./images/pc/top1_1/永恒瞬间：咱们的抗战.jpg" },
        { title: "红军长征记：原始记录", link: "https://jinghecx.com/mobile/?s=clcn&b=16256965205643206", url: "./images/pc/top1_1/红军长征记：原始记录.jpg" },
        { title: "陕西抗战事件", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=140134114169717132", url: "./images/pc/top1_1/陕西抗战事件.jpg" },
        { title: "命运攸关的抉择", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=5004345569444315", url: "./images/pc/top1_1/命运攸关的抉择.jpg" },
        { title: "二战风云", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=277075607354937760", url: "./images/pc/top1_1/二战风云.jpg" },
        { title: "抗战为什么赢：中国人民伟大的抗日战争", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=232552112348249255", url: "./images/pc/top1_1/抗战为什么赢：中国人民伟大的抗日战争.jpg" },
        { title: "抗击：1937—1945", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=12797095576601023", url: "./images/pc/top1_1/抗击：1937—1945.jpg" },
        { title: "历史丰碑", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=37013014544647082", url: "./images/pc/top1_1/历史丰碑.jpg" },
    ],
    top1_2: [
        { title: "【视频】太行山上", link: "http://hd.yalejy.com/show/index?id=90080", url: "./images/pc/top1_2/【视频】《太行山上》.jpg" },
        { title: "【视频】地道战", link: "http://hd.yalejy.com/show/index?id=90019", url: "./images/pc/top1_2/【视频】《地道战》.jpg" },
        { title: "【视频】地雷战", link: "http://hd.yalejy.com/show/index?id=90020", url: "./images/pc/top1_2/【视频】《地雷战》.jpg" },
    ],
    top1_3: [
        { title: "【音频】夜袭阳明堡", link: "https://qrcode-share.yuntuys.com/v2/?t=yt&MTIy&NDA1ODk", url: "./images/pc/top1_3/【音频】夜袭阳明堡.jpg" },
        { title: "【音频】首战平型关", link: "https://qrcode-share.yuntuys.com/v2/?t=yt&MTIy&NDA1ODc", url: "./images/pc/top1_3/【音频】首战平型关.jpg" },
        { title: "【音频】风雪祁连山", link: "https://qrcode-share.yuntuys.com/v2/?t=yt&MTIy&NDA4NTA", url: "./images/pc/top1_3/【音频】风雪祁连山.jpg" },
        { title: "【音频】不需要的战争：丘吉尔亲述二战", link: "https://qrcode-share.yuntuys.com/v2/?t=yt&MTIy&MTkzNzA", url: "./images/pc/top1_3/【音频】不需要的战争：丘吉尔亲述二战.jpg" },
    ],
    // 中间
    top2_1: [
        { title: "抗战旗帜毛泽东", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=232553572637130055", url: "./images/pc/top2_1/抗战旗帜毛泽东.jpg" },
        { title: "烽火忆抗战", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=154945407678229987", url: "./images/pc/top2_1/烽火忆抗战.jpg" },
        { title: "西城追忆·抗战西城", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=29927418017874110", url: "./images/pc/top2_1/西城追忆·抗战西城.jpg" },
        { title: "革命烈士诗抄", link: "https://jinghecx.com/mobile/?s=clcn&b=17613885006718806", url: "./images/pc/top2_1/革命烈士诗抄.jpg" },
        { title: "敌后武工队", link: "https://www.cxstar.com/Book/Detail?ruid=286da5df00003cXXXX&packageruid=", url: "./images/pc/top2_1/敌后武工队.jpg" },
        { title: "烽火三少年", link: "https://www.cxstar.com/Book/Detail?ruid=286da693000035XXXX&packageruid=", url: "./images/pc/top2_1/烽火三少年.jpg" },
        { title: "两个小八路", link: "https://www.cxstar.com/Book/Detail?ruid=286da45a000003XXXX&packageruid=", url: "./images/pc/top2_1/两个小八路.jpg" },
        { title: "闪闪的红星", link: "https://www.cxstar.com/Book/Detail?ruid=286da2ef00112eXXXX&packageruid=", url: "./images/pc/top2_1/闪闪的红星.jpg" },
        { title: "将领讲述.八路军抗战", link: "https://www.cxstar.com/Book/Detail?ruid=27512d4300036dXXXX&packageruid=", url: "./images/pc/top2_1/将领讲述.八路军抗战.jpg" },
        { title: "将领讲述.东北军抗战", link: "https://www.cxstar.com/Book/Detail?ruid=27512d420000e3XXXX&packageruid=", url: "./images/pc/top2_1/将领讲述.东北军抗战.jpg" },
        { title: "将领讲述.新四军抗战", link: "https://www.cxstar.com/Book/Detail?ruid=27512d68000084XXXX&packageruid=", url: "./images/pc/top2_1/将领讲述.新四军抗战.jpg" },
    ],
    top2_2: [
        { title: "【北京档案】抗林迈可小道：隐秘小径上的的抗战通道", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/BCFBC2BA-20BF-4B59-A6FD-825684AAE3AE/2025/4/bjda20250413/JARYVu55I_5XWHEIBOEOww==", url: "./images/pc/top2_2/【北京档案】抗林迈可小道：隐秘小径上的的抗战通道.jpg" },
        { title: "【北京档案】平郊抗日根据地的平民英雄", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/BCFBC2BA-20BF-4B59-A6FD-825684AAE3AE/2025/2/bjda20250214/kvxgBvWcvgaBDaUVF8UKUw==", url: "./images/pc/top2_2/【北京档案】平郊抗日根据地的平民英雄.jpg" },
        { title: "【北京支部生活】老帽山六壮士：无名英雄筑丰碑", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/A1F6CB94-B26A-479F-AABB-E8D1DF541290/2025/6/bjdz20250611/KaTWkX6yXi5AOMcjKUSA6A==", url: "./images/pc/top2_2/【北京支部生活】老帽山六壮士：无名英雄筑丰碑.jpg" },
        { title: "【环球人物】“两次殉国”的英雄团长", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/322145C8-6F78-49B6-B72E-9A128A3A50E3/2025/6/hqrw20250623/LWZJwhlbw5xHaS1NIl2JQg==", url: "./images/pc/top2_2/【环球人物】“两次殉国”的英雄团长.jpg" },
        { title: "【百年潮】飞虎队与中国共产党", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/BF97B818-5CD2-4D50-A60D-6668A565B7E4/2025/3/banc20250311/JdLeKWmL5U3HsZMO0gEcmg==", url: "./images/pc/top2_2/【百年潮】飞虎队与中国共产党.jpg" },
        { title: "【党史文汇】三封书信见证八路军川陕运输", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/CF61B37E-420E-4D51-8CED-3CE39FDE544E/2025/2/dswh20250207/xMVN0quONYhGSGtFAZQ8hw==", url: "./images/pc/top2_2/【党史文汇】三封书信见证八路军川陕运输.jpg" },
        { title: "【人民周刊】同心夺敌胆 打出百将团", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/CC0C0D40-D4C6-43BB-97F7-6B5EE8BA0DA7/2025/9/rmwz20250941/vJE6dZZdm8kbLXsxnELQcQ==", url: "./images/pc/top2_2/【人民周刊】同心夺敌胆 打出百将团.jpg" },
        { title: "【共产党员·下半月】抗联英烈魏拯民：革命红旗，一定会插遍全中国", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/51BF6097-208F-4F97-AFB5-BD1C4EB704AF/2025/2/gcdx20250232/YL4S87fkCpfZFQYeXNJEaw==", url: "./images/pc/top2_2/【共产党员·下半月】抗联英烈魏拯民：革命红旗，一定会插遍全中国.jpg" },
        { title: "【名人传记】“请命之作”：张恨水为抗战将士扬名立万", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/3C4774EC-C45C-4F57-BD72-D55362869CA5/2025/5/mrzj20250510/XjlZwDvXaGQzt6krTPhJIQ==", url: "./images/pc/top2_2/【名人传记】“请命之作”：张恨水为抗战将士扬名立万.jpg" },
        { title: "【南方文坛】贺绿汀的《游击队歌》与抗战时期的战地流行曲", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/53DB9326-418B-48FE-BA73-0C88352F01B6/2025/1/nflt20250120/He4XkDJSiIN3H6tDYAYK0w==", url: "./images/pc/top2_2/【南方文坛】贺绿汀的《游击队歌》与抗战时期的战地流行曲.jpg" },
        { title: "【共产党员·上半月】东北抗日联军第二军", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/D82D5A38-1B3E-4DE8-92F0-2695EF3872BE/2025/4/gcjy20250426/Njom_jCx7l-elMiLyogk6Q==", url: "./images/pc/top2_2/【共产党员·上半月】东北抗日联军第二军.jpg" },
        { title: "【共产党员·上半月】东北抗日联军第一军", link: "https://sdtsg.dps.qikan.cn/pc2/index#/textReading/magazine/D82D5A38-1B3E-4DE8-92F0-2695EF3872BE/2025/3/gcjy20250333/eh7woGUJXYAcEsRvkYY9GA==", url: "./images/pc/top2_2/【共产党员·上半月】东北抗日联军第一军.jpg" },
    ],
    top2_3: [
        { title: "【视频】铁道游击队", link: "http://hd.yalejy.com/show/index?id=92287", url: "./images/pc/top2_3/【视频】《铁道游击队》.jpg" },
        { title: "【视频】平原游击队", link: "http://hd.yalejy.com/show/index?id=90065", url: "./images/pc/top2_3/【视频】《平原游击队》.jpg" },
        { title: "【视频】烈火金钢", link: "http://hd.yalejy.com/show/index?id=90052", url: "./images/pc/top2_3/【视频】《烈火金钢》.jpg" },
        { title: "【视频】狼牙山五壮士", link: "http://hd.yalejy.com/show/index?id=94042", url: "./images/pc/top2_3/【视频】《狼牙山五壮士》.jpg" },
        { title: "【视频】吕梁英雄", link: "http://hd.yalejy.com/show/index?id=94899", url: "./images/pc/top2_3/【视频】《吕梁英雄》.jpg" },
        { title: "【视频】九死一生之把一切献给党", link: "http://hd.yalejy.com/show/index?id=90045", url: "./images/pc/top2_3/【视频】《九死一生之把一切献给党》.jpg" },
        { title: "【视频】马石山十勇士", link: "http://hd.yalejy.com/show/index?id=90059", url: "./images/pc/top2_3/【视频】《马石山十勇士》.jpg" },
        { title: "【视频】抵抗！抵抗！", link: "http://hd.yalejy.com/show/index?id=90018", url: "./images/pc/top2_3/【视频】《抵抗！抵抗！》.jpg" },
    ],
    // 底部
    top3_1: [
        { title: "峥嵘岁月：华侨青年回国参加抗战回忆录", link: "https://jinghecx.com/mobile/?s=clcn&b=23566346809019406", url: "./images/pc/top3_1/峥嵘岁月：华侨青年回国参加抗战回忆录.jpg" },
        { title: "历史丰碑：海外华侨与抗日战争", link: "https://jinghecx.com/mobile/?s=clcn&b=26374711201315206", url: "./images/pc/top3_1/历史丰碑：海外华侨与抗日战争.jpg" },
        { title: "永恒瞬间：咱们的抗战", link: "https://jinghecx.com/mobile/?s=clcn&b=17613885006718806", url: "./images/pc/top3_1/永恒瞬间：咱们的抗战.jpg" },
        { title: "四世同堂", link: "https://jinghecx.com/mobile/?s=clcn&b=11488371004058506", url: "./images/pc/top3_1/四世同堂.jpg" },
        { title: "上海之声：二战时期来华犹太流亡者的心声", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=81219704173101096", url: "./images/pc/top3_1/上海之声：二战时期来华犹太流亡者的心声.jpg" },
        { title: "战俘", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=140133950960960496", url: "./images/pc/top3_1/战俘.jpg" },
        { title: "不许可：日军ibal记者相机中的侵华历史", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=33921840682369146", url: "./images/pc/top3_1/不许可：日军ibal记者相机中的侵华历史.jpg" },
        { title: "许渊冲：永远的西南联大", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=208049396938702082", url: "./images/pc/top3_1/许渊冲：永远的西南联大.jpg" },
        { title: "美术与抗战", link: "https://h5.metareader.cn/h5/pages/book/read?tenantId=101603&appId=b065tgj8&thirdPL=sdtsg-aleph&bid=232553606996868471", url: "./images/pc/top3_1/美术与抗战.jpg" },
    ],
    top3_2: [
        { title: "【线上展览】不朽的印记 文献中的抗战", link: "https://s.eqxiu.com/s/mfF9wa5l?bt=yxy&eip=true&share_level=1&from_user=202507039b53b081&from_id=4f9ac324-b&share_time=1751529860943", url: "./images/pc/top3_2/《不朽的印记 文献中的抗战》线上展览.jpg" },
        { title: "【视频】自有后来人", link: "http://hd.yalejy.com/show/index?id=96619", url: "./images/pc/top3_2/【视频】《自有后来人》.jpg" },
        { title: "【视频】草原晨曲", link: "http://hd.yalejy.com/show/index?id=96516", url: "./images/pc/top3_2/【视频】《草原晨曲》.jpg" },
        { title: "【视频】黄河少年", link: "http://hd.yalejy.com/show/index?id=83975", url: "./images/pc/top3_2/【视频】《黄河少年》.jpg" },
        { title: "【视频】云上日出", link: "http://hd.yalejy.com/show/index?id=92785", url: "./images/pc/top3_2/【视频】《云上日出》.jpg" }
    ],
    top3_3: [
        { title: "《红灯记》", link: "https://yueting.crc-musiconline.com/yybh5/awv80NlncList", url: "./images/pc/top3_3/《红灯记》.jpg", text: '<p>战火淬炼的音符从破碎的山河间升起，而历史从未远去。</p><p>本专辑精选若干首经典抗战歌曲，让我们循着黑胶唱纹里封存的记忆，在音符中触摸历史的温度，在回响里听见民族的脊梁。</p>' },
    ],
};

// DOM元素加载完成后执行
document.addEventListener('DOMContentLoaded', function () {
    // 初始化页面
    initPage();

    // 添加响应式调整
    window.addEventListener('resize', handleResize);

    // 初始调整
    handleResize();
});

// 初始化页面内容
function initPage() {

    // 创建内容区域
    var top1_1 = '';
    exhibitionData.top1_1.forEach(item => {
        top1_1 += `
            <a href="${item.link}" title="${item.title}" target="_blank" class="book-item">
                <img src="${item.url}">
                <p>${item.title}</p>
            </a>
            `;
    });
    document.querySelector('.top1_1').innerHTML = top1_1;
    document.querySelector('.stop1_1').innerHTML = top1_1;

    var top1_2 = '';
    exhibitionData.top1_2.forEach(item => {
        top1_2 += `
            <a href="${item.link}" title="${item.title}" target="_blank" class="book-item">
                <img src="${item.url}">
                <p>${item.title}</p>
            </a>
            `;
    });
    document.querySelector('.top1_2').innerHTML = top1_2;
    document.querySelector('.stop1_2').innerHTML = top1_2;

    var top1_3 = '';
    exhibitionData.top1_3.forEach(item => {
        top1_3 += `
            <a href="${item.link}" title="${item.title}" target="_blank" class="book-item">
                <img src="${item.url}">
                <p>${item.title}</p>
            </a>
            `;
    });
    document.querySelector('.top1_3').innerHTML = top1_3;
    document.querySelector('.stop1_3').innerHTML = top1_3;

    var top2_1 = '';
    exhibitionData.top2_1.forEach(item => {
        top2_1 += `
            <a href="${item.link}" title="${item.title}" target="_blank" class="book-item">
                <img src="${item.url}">
                <p>${item.title}</p>
            </a>
            `;
    });
    document.querySelector('.top2_1').innerHTML = top2_1;
    document.querySelector('.stop2_1').innerHTML = top2_1;

    var top2_2 = '';
    exhibitionData.top2_2.forEach(item => {
        top2_2 += `
            <a href="${item.link}" title="${item.title}" target="_blank" class="book-item">
                <img src="${item.url}">
                <p>${item.title}</p>
            </a>
            `;
    });
    document.querySelector('.top2_2').innerHTML = top2_2;
    document.querySelector('.stop2_2').innerHTML = top2_2;

    var top2_3 = '';
    exhibitionData.top2_3.forEach(item => {
        top2_3 += `
            <a href="${item.link}" title="${item.title}" target="_blank" class="book-item">
                <img src="${item.url}">
                <p>${item.title}</p>
            </a>
            `;
    });
    document.querySelector('.top2_3').innerHTML = top2_3;
    document.querySelector('.stop2_3').innerHTML = top2_3;


    var top3_1 = '';
    exhibitionData.top3_1.forEach(item => {
        top3_1 += `
            <a href="${item.link}" title="${item.title}" target="_blank" class="book-item">
                <img src="${item.url}">
                <p>${item.title}</p>
            </a>
            `;
    });
    document.querySelector('.top3_1').innerHTML = top3_1;
    document.querySelector('.stop3_1').innerHTML = top3_1;

    var top3_2 = '';

    top3_2 += `<a href="${exhibitionData.top3_2[0].link}" title="${exhibitionData.top3_2[0].title}" target="_blank" class="f_banner"><img src="${exhibitionData.top3_2[0].url}" class="img"></a><a href="${exhibitionData.top3_2[0].link}" target="_blank" class="f_banner_title">${exhibitionData.top3_2[0].title}</a><div class="book-container book-container4">`;

    // 去掉第一个
    let temp = exhibitionData.top3_2.slice(1);

    temp.forEach(item => {
        top3_2 += `
            <a href="${item.link}" title="${item.title}" target="_blank" class="book-item">
                <img src="${item.url}">
                <p>${item.title}</p>
            </a>
            `;
    });
    top3_2 += `</div>`;
    document.querySelector('.top3_2').innerHTML = top3_2;
    document.querySelector('.stop3_2').innerHTML = top3_2;



    var top3_3 = `<a title="${exhibitionData.top3_3[0].title}" href=" ${exhibitionData.top3_3[0].link}" target="_blank">
                            <img src="${exhibitionData.top3_3[0].url}" class="v_box_bj">
                            <div class="v_box_name">
                                ${exhibitionData.top3_3[0].title}
                            </div>
                            <div class="v_box_main">
                               ${exhibitionData.top3_3[0].text}
                            </div>
                        </a>`;
    document.querySelector('.top3_3').innerHTML = top3_3;
    document.querySelector('.stop3_3').innerHTML = top3_3;
}

// 处理窗口大小变化
function handleResize() {
    const isMobile = window.innerWidth <= 768;
    const desktopSliders = document.querySelectorAll('.content-slider');
    const mobileSliders = document.querySelectorAll('.mobile-container');

    desktopSliders.forEach(slider => {
        slider.style.display = isMobile ? 'none' : 'block';
    });

    mobileSliders.forEach(slider => {
        slider.style.display = isMobile ? 'block' : 'none';
    });
}

function initSwiper() {


    const swiper1 = new Swiper('.mySwiper1', {

        initialSlide: 0,

        // 布局配置
        slidesPerView: 'auto',
        centeredSlides: true,
        loop: true,
        spaceBetween: 0,
        // 解决3个卡片时的循环问题
        loopAdditionalSlides: 0,
        loopedSlides: 3,

        // 导航按钮
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },

        // 初始化回调，确保布局正确
        on: {
            init: function () {
                // 强制刷新布局
                this.update();

                // 处理3个卡片的特殊情况
                if (this.slides.length <= 3) {
                    // 复制卡片确保循环显示
                    const originalSlides = Array.from(this.slides).slice(0, this.slides.length);
                    originalSlides.forEach(slide => {
                        const clone = slide.cloneNode(true);
                        this.wrapperEl.appendChild(clone);
                    });
                    this.update();
                }
            },


            slideChangeTransitionEnd: function () {
                this.update();
            }
        }
    });

    const swiper2 = new Swiper('.mySwiper2', {

        initialSlide: 0,

        // 布局配置
        slidesPerView: 'auto',
        centeredSlides: true,
        loop: true,
        spaceBetween: 0,

        // 解决3个卡片时的循环问题
        loopAdditionalSlides: 0,
        loopedSlides: 3,

        // 导航按钮
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },

        // 初始化回调，确保布局正确
        on: {
            init: function () {
                // 强制刷新布局
                this.update();

                // 处理3个卡片的特殊情况
                if (this.slides.length <= 3) {
                    // 复制卡片确保循环显示
                    const originalSlides = Array.from(this.slides).slice(0, this.slides.length);
                    originalSlides.forEach(slide => {
                        const clone = slide.cloneNode(true);
                        this.wrapperEl.appendChild(clone);
                    });
                    this.update();
                }
            },


            slideChangeTransitionEnd: function () {
                this.update();
            }
        }
    });

    const swiper3 = new Swiper('.mySwiper3', {

        initialSlide: 0,

        // 布局配置
        slidesPerView: 'auto',
        centeredSlides: true,
        loop: true,
        spaceBetween: 0,

        // 解决3个卡片时的循环问题
        loopAdditionalSlides: 0,
        loopedSlides: 3,

        // 导航按钮
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },

        // 初始化回调，确保布局正确
        on: {
            init: function () {
                // 强制刷新布局
                this.update();

                // 处理3个卡片的特殊情况
                if (this.slides.length <= 3) {
                    // 复制卡片确保循环显示
                    const originalSlides = Array.from(this.slides).slice(0, this.slides.length);
                    originalSlides.forEach(slide => {
                        const clone = slide.cloneNode(true);
                        this.wrapperEl.appendChild(clone);
                    });
                    this.update();
                }
            },


            slideChangeTransitionEnd: function () {
                this.update();
            }
        }
    });
}

setTimeout(function () {
    initSwiper();
}, 300);
setTimeout(function () {
    document.querySelector('.main').style.opacity = '1';
}, 500);

